/*
 * Copyright (c) ycq_work@163.com
 */

package com.mxg.blog.mapper;

/**
 * @Author: ycq_work@163.com
 * @DATE: 2023/5/13 10:22
 * 文章分类表的mapper接口
 */

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mxg.blog.entity.ArticleCategory;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ArticleCategoryMapper extends BaseMapper<ArticleCategory> {
    // 获取所有文章分类
    List<ArticleCategory> getArticleCategory();
    // 获取所有分了分类的题目
    List<String> getArticleCategoryName();

    // 根据分类标题, 获取分类Id
    ArticleCategory getArticleCategoryIdByName(String articleCategoryName);

    // 根据分类id, 获取分类名称
    ArticleCategory getArticleCategoryNameById(Integer articleCategoryId);

    // 删除分类
    void deleteArticleCategoryByIds(Integer articleCategoryId);

    // 添加分类
    void addArticleCategory(String articleCategoryName);

}
